<style>
    .footer-home{display: none}
    img{max-height:100%;}
</style>
<header>
    <a href="javascript:history.back();">
        <i class="iconfont icon-xialalan-copy"></i>
    </a>
    <span>评价详情</span>

</header>
<div class="food_ass_div margin_bot">
  <!--  <div class="food_title">
        <a href="#" class="on" >全部</a>
        <a href="#">最新评价</a>
        <a href="#">好评</a>
        <a href="#">差评</a>
        <a href="#">性价比高</a>
        <a href="#">主食赞</a>
        <a href="#">服务好</a>
        <a href="#">服务好</a>
        <a href="#">服务好</a>
    </div>-->
    <div class="assessment_item">
        <?php if($output['comment_list']): ?>
        <?php foreach($output['comment_list'] as $key => $value):  ?>
        <div class="ass_list">
            <div class="ass_img">
                <img src="<?php echo $value['member_head']; ?>" alt="用户头像">
            </div>
            <div class="ass_info">
                <h1><?php echo $value['member_name']; ?><span class="fr"><?php echo date('Y-m-d',$value['addtime']); ?></span></h1>
                <p class="cleanfloat starFive sF1">
                    <?php for($i=0;$i<$value['all_point'];$i++):?>
                    <span class="org_star iconfont icon-xingxing"></span>
                    <?php endfor; ?>
                    <b><?php echo $value['all_point'];?>分</b>
                </p>
                <p class="p-2 p_info"><?php echo  $value['content'];?></p>
                <ul class="food_pic">
                    <?php if($value['pic_1']): ?>
                    <li><img src="<?php echo $value['pic_1']; ?>"></li>
                    <?php endif; ?>
                    <?php if($value['pic_2']): ?>
                        <li><img src="<?php echo $value['pic_2']; ?>"></li>
                    <?php endif; ?>
                    <?php if($value['pic_3']): ?>
                        <li><img src="<?php echo $value['pic_3']; ?>"></li>
                    <?php endif; ?>
                </ul>
            </div>
        </div>
            <?php endforeach; ?>
        <?php endif; ?>
    </div>

</div>
<script>
    //ajax加载分页

    var allNum = <?php echo $output['TotalNum']; ?>,
        allPage = <?php echo $output['TotalPage']; ?>,
        curPage = 1;

    var is_scroll = false;
    $(window).scroll(function () {
        is_scroll = true;
        //已经滚动到上面的页面高度
        var scrollTop = $(this).scrollTop();
        //页面高度
        var scrollHeight = $(document).height();
        //浏览器窗口高度
        var windowHeight = $(this).height();
        //此处是滚动条到底部时候触发的事件，在这里写要加载的数据，或者是拉动滚动条的操作
        if (scrollTop + windowHeight == scrollHeight) {
            $('.load').show();
            loadpage();
        }
    });
    //ajax加载数据
    function loadpage() {
        if(!is_scroll){
            return;
        }
        if (curPage < allPage) {
            curPage += 1;
        } else {
            $('.load').text('没有更多内容了').show();
            return;
        }
        $.get(location.href, {isajax:1,curpage:curPage},function(data){
            if(data){
                $(".assessment_item").append(data);
                $('.load').hide();
            }
        });
    }
</script>